package com.chen.common.mbg.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName ak_goods
 */
@TableName(value ="ak_goods")
@Data
public class Goods implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer gId;

    /**
     * 
     */
    private String gName;

    /**
     * 
     */
    private String gInfo;

    /**
     * 
     */
    private String gImage;

    /**
     * 
     */
    private String gCategory;

    /**
     * 
     */
    private Integer gPrice;

    /**
     * 
     */
    private Integer gSid;

    /**
     * sales volume销量
     */
    private Integer gSv;

    private Integer gStock;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Goods other = (Goods) that;
        return (this.getGId() == null ? other.getGId() == null : this.getGId().equals(other.getGId()))
            && (this.getGName() == null ? other.getGName() == null : this.getGName().equals(other.getGName()))
            && (this.getGInfo() == null ? other.getGInfo() == null : this.getGInfo().equals(other.getGInfo()))
            && (this.getGImage() == null ? other.getGImage() == null : this.getGImage().equals(other.getGImage()))
            && (this.getGCategory() == null ? other.getGCategory() == null : this.getGCategory().equals(other.getGCategory()))
            && (this.getGPrice() == null ? other.getGPrice() == null : this.getGPrice().equals(other.getGPrice()))
            && (this.getGSid() == null ? other.getGSid() == null : this.getGSid().equals(other.getGSid()))
            && (this.getGSv() == null ? other.getGSv() == null : this.getGSv().equals(other.getGSv()))
            && (this.getGStock() == null ? other.getGStock() == null : this.getGStock().equals(other.getGStock()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getGId() == null) ? 0 : getGId().hashCode());
        result = prime * result + ((getGName() == null) ? 0 : getGName().hashCode());
        result = prime * result + ((getGInfo() == null) ? 0 : getGInfo().hashCode());
        result = prime * result + ((getGImage() == null) ? 0 : getGImage().hashCode());
        result = prime * result + ((getGCategory() == null) ? 0 : getGCategory().hashCode());
        result = prime * result + ((getGPrice() == null) ? 0 : getGPrice().hashCode());
        result = prime * result + ((getGSid() == null) ? 0 : getGSid().hashCode());
        result = prime * result + ((getGSv() == null) ? 0 : getGSv().hashCode());
        result = prime * result + ((getGStock() == null) ? 0 : getGStock().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", gId=").append(gId);
        sb.append(", gName=").append(gName);
        sb.append(", gInfo=").append(gInfo);
        sb.append(", gImage=").append(gImage);
        sb.append(", gCategory=").append(gCategory);
        sb.append(", gPrice=").append(gPrice);
        sb.append(", gSid=").append(gSid);
        sb.append(", gSv=").append(gSv);
        sb.append(", gStock=").append(gStock);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}